home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / ada / gnat1792.zip / gnat179b / examples / instr-ch.adb < prev    next >
Text File  |  1994-05-13  |  622b  |  20 lines

  1. with Io; use Io;
  2. package body Instr.Child is 
  3.  
  4.    procedure Display_Value (C : Accurate_Clock) is 
  5.    begin 
  6.       Display_Value (Clock (C));
  7.       Put (":"); 
  8.       Put (Character'Val (Character'Pos ('0') + (C.MilliSec / 100) mod 10));
  9.       Put (Character'Val (Character'Pos ('0') + (C.MilliSec / 10) mod 10));
  10.       Put (Character'Val (Character'Pos ('0') + C.MilliSec mod 10));
  11.    end Display_Value;
  12.       
  13.    procedure Increment (C : in out Accurate_Clock; Inc : Integer := 1) is 
  14.    begin
  15.      Increment (Clock (C), (C.MilliSec + Inc) / 1000);
  16.      C.MilliSec := (C.MilliSec + Inc) mod 1000;
  17.    end Increment;
  18.  
  19. end;
  20.